package com.example.onlineanswer.model.vo;

import lombok.Data;

/**
 * 答题统计VO
 */
@Data
public class AnswerStatisticsVO {
    
    /**
     * 总答题数
     */
    private Integer totalAnswers;
    
    /**
     * 正确答题数
     */
    private Integer correctCount;
    
    /**
     * 错误答题数
     */
    private Integer wrongCount;
    
    /**
     * 正确率
     */
    public Double getCorrectRate() {
        if (totalAnswers == null || totalAnswers == 0) {
            return 0.0;
        }
        return correctCount * 100.0 / totalAnswers;
    }
} 